#pragma once
#include <qobject.h>
#include <list>
#include <mutex>
#include <atomic>
#include <thread>

class TTS: public QObject
{
public:
	TTS();

	~TTS();

	void Init();

	bool SpeakText(std::wstring wsText);

	void ThreadFun();

private:
	std::list<std::wstring> m_listStrTTS;
	std::mutex m_mutexTTS;
	std::thread m_thread;

	std::atomic_bool m_bInited;
	std::atomic_bool m_bThreadRunning;
	std::atomic_int m_nListSize;
};

